function Product(product, isOwner, imageSize) {
	var self = this;
	self.id = product.id;
	self.name = product.name;
	self.shortName = product.shortName;
	self.shortSubtitle = product.shortSubtitle;
	self.category = product.category;
	self.isOwner = isOwner;
	
	self.principalImages = ko.utils.arrayFilter(product.images, function(item) { return item.isPrincipal === true; });
	
	if(self.principalImages[0]) {
		self.imageUrl = getImagePath('image/productThumb', self.principalImages[0].path, imageSize || "medium");
	} else {
		self.imageUrl = getImagePath('image/productThumb', "defaultProduct.jpg");
	}

	self.qtyVisits = product.qtyVisits;
	
	self.goToDetail = function() {
		redirect('product/detail/' + self.id + '/' + self.name.replaceAll(' ', '-'));
	};
	
	self.deleteProduct = function() {
		if(self.isOwner) {
			profileViewModel.deletedProductName(self.name);
			profileViewModel.deletedProductId(self.id);
			$('#confirmProductDeletionModal').modal('show');
		}
	};
	
	self.editProduct = function() {
		if(self.isOwner) {
			redirect('product/productEdition/' + self.id);
		}
	};
};